﻿using DemoPrism.Core;
using Prism.Ioc;
using Prism.Modularity;
using Prism.Navigation.Regions;
using XmlMod.Views;

namespace XmlMod
{
    public class XmlModModule : IModule
    {
        private readonly IRegionManager _regionManager;
        public XmlModModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }

        public void OnInitialized(IContainerProvider containerProvider)
        {
            _regionManager.RequestNavigate(RegionNames.ContentRegion, "XmlMain");
        }

        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation<XmlMain>();
        }
    }
}